<?
require('./application/views/header.php');

?>

		<script type="text/javascript">
		
        	$(document).ready(function() {
		$(".datepicker").datepicker({dateFormat: 'dd/mm/yy'});
	});


        </script>
		
    	<div id="content">
			<h2><?= $this -> action ?></h2>
            
            <? if($this -> exists('video')){ ?>
            
            <div class="form_info">Het kan 30 minuten duren alvorens de video zichtbaar wordt op de site</div>
			
			<? } ?>
             <? if($this -> exists('itemName') && $this -> itemName == "nieuwsberichten"){ ?>
                        <a href="/beheerder/nieuws/" class="terug">Terug</a>
						<? }elseif($this -> exists('itemName') && $this -> itemName == "lessen"){?>
                        	 <a href="/beheerder/lessen/" class="terug">Terug</a>
                        
                        
                        <? }elseif($this -> exists('itemName') && $this -> itemName == "helpberichten"){?>
                        	 <a href="/beheerder/help/" class="terug">Terug</a>
                        
                        <? }else{ ?>
                       
                         <a href="/gebruiker/<?= $this -> module ?>/<?= $this -> id ?>" class="terug">Terug</a>
                        <? } ?>
           
           	<?
			if($this -> exists('errors')){
			echo '<div class="form_errors">';
			echo '<h3>Oeps ... Foutje</h3>';
            echo '<ul>';
            	
				foreach($this -> errors as $error){
				
					echo '<li>' . $error . '</li>';
				
				}
				
            echo '</ul></div>';
            
			}
			
			if($this -> exists('succes')){
				echo '<div class="form_succes">';
				echo '<h3>'.$this -> succes.'</h3>';
				echo '</div>';
			}
            ?>
            
            <? 
			
				echo $this -> form -> render(); 
			
			?>
            
        </div>
  
<? include('footer.php'); ?>